import request from '@/utils/request'
/*
 *********
 *分类相关*
 *********
*/
// 增加分类
export function addClassify(param) {
  return request({
    url: '/classify/add',
    method: 'get',
    params: param
  })
}

// 查询分类
export function searchClassify(param) {
  return request({
    url: '/classify/search',
    method: 'get',
    params: param
  })
}

// 修改分类名字
export function editClassify(param) {
  return request({
    url: '/classify/edit',
    method: 'get',
    params: param
  })
}

// 删除分类名字
export function deleteclassifyName(param) {
  return request({
    url: '/classify/delete',
    method: 'get',
    params: param
  })
}

/*
 *********
 *用户文章相关*
 *********
*/
// 新建文章
export function addArticle(param) {
  return request({
    url: '/article/add',
    method: 'post',
    data: param
  })
}

// 修改文章
export function editArticle(param) {
  return request({
    url: '/article/edit',
    method: 'post',
    data: param
  })
}

// 文章列表
export function getList(param) {
  return request({
    url: '/article/search',
    method: 'get',
    params: param
  })
}

// 删除
export function deleteArticle(param) {
  return request({
    url: '/article/delete',
    method: 'post',
    data: param
  })
}

// 移动文章
export function moveArticled(param) {
  return request({
    url: '/article/move',
    method: 'post',
    data: param
  })
}

// 发布文章
export function sendArticleIndex(param) {
  return request({
    url: '/indexArticle/send',
    method: 'post',
    data: param
  })
}
